-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix serial migration #4356
Fix serial migration #4356
Conversation
Code improvements
The tests were successful:
|
private void checkTaskAndId(Process parentProcess) throws IOException { | ||
URI parentMetadataFilePath = fileService.getMetadataFilePath(parentProcess, true, true); | ||
Workpiece workpiece = ServiceManager.getMetsService().loadWorkpiece(parentMetadataFilePath); | ||
ImportService.checkTasks(parentProcess, workpiece.getRootElement().getType()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the method checkTasks
is required here as well (and not just during import), wouldn't it make sense to move that method from ImportService
to WorkflowControllerService
or ProcessService
?
@Test | ||
public void testHierarchyMigration() throws DAOException, ProcessGenerationException, CommandException, | ||
DataException, IOException, SAXException, ParserConfigurationException { | ||
HierarchyMigrationTask hierarchyMigrationTask = new HierarchyMigrationTask(Arrays.asList(project)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HierarchyMigrationTask hierarchyMigrationTask = new HierarchyMigrationTask(Arrays.asList(project)); | |
HierarchyMigrationTask hierarchyMigrationTask = new HierarchyMigrationTask(Collections.singletonList(project)); |
|
||
import java.io.File; | ||
import java.io.IOException; | ||
import java.util.Arrays; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import java.util.Arrays; | |
import java.util.Collections; |
} | ||
|
||
private static void createTestMetaAnchorfile() throws Exception { | ||
List<String> lines = Arrays.asList("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
List<String> lines = Arrays.asList("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n" | |
List<String> lines = Collections.singletonList("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n" |
} | ||
|
||
private static void createTestMetafile() throws Exception { | ||
List<String> lines = Arrays.asList("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
List<String> lines = Arrays.asList("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n" | |
List<String> lines = Collections.singletonList("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You forgot to remove one unused import
Kitodo/src/test/java/org/kitodo/production/helper/tasks/HierarchyMigrationTaskIT.java
Outdated
Show resolved
Hide resolved
…chyMigrationTaskIT.java Co-authored-by: Arved Solth <[email protected]>
fixes #4270
resolves #4268
fix #4267